/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class EtcAddressbook extends BaseModel {
	
	//alias
	public static final String TABLE_ALIAS = "EtcAddressbook";
	public static final String ALIAS_AD_ID = "主键ID";
	public static final String ALIAS_USER_ID = "用户ID";
	public static final String ALIAS_AD_PROVINCE = "省";
	public static final String ALIAS_AD_CITY = "市";
	public static final String ALIAS_AD_REGION = "县/区";
	public static final String ALIAS_AD_DETAILADDRESS = "详细地址";
	public static final String ALIAS_AD_CONSIGNEE = "收货人姓名";
	public static final String ALIAS_AD_CONSIGNEEPHONE = "收货人手机号码";
	 
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private java.lang.String ad_id;
	private java.lang.String user_id;
	private java.lang.String ad_province;
	private java.lang.String ad_city;
	private java.lang.String ad_region;
	private java.lang.String ad_detailaddress;
	private java.lang.String ad_consignee;
	private java.lang.String ad_consigneephone;
	//columns END

	public EtcAddressbook(){
	}

	public EtcAddressbook(
		java.lang.String ad_id
	){
		this.ad_id = ad_id;
	}

	/**  
	 * 设置主键ID  
	 * @param ad_id 主键ID  
	 */  
	public void setAd_id(java.lang.String ad_id) {
		this.ad_id = ad_id;
	}
	
	/**  
	 * 获取主键ID   
	 * @return ad_id 主键ID   
	 */
	public java.lang.String getAd_id() {
		return this.ad_id;
	}
	/**  
	 * 设置用户ID  
	 * @param user_id 用户ID  
	 */  
	public void setUser_id(java.lang.String user_id) {
		this.user_id = user_id;
	}
	
	/**  
	 * 获取用户ID   
	 * @return user_id 用户ID   
	 */
	public java.lang.String getUser_id() {
		return this.user_id;
	}
	/**  
	 * 设置省  
	 * @param ad_province 省  
	 */  
	public void setAd_province(java.lang.String ad_province) {
		this.ad_province = ad_province;
	}
	
	/**  
	 * 获取省   
	 * @return ad_province 省   
	 */
	public java.lang.String getAd_province() {
		return this.ad_province;
	}
	/**  
	 * 设置市  
	 * @param ad_city 市  
	 */  
	public void setAd_city(java.lang.String ad_city) {
		this.ad_city = ad_city;
	}
	
	/**  
	 * 获取市   
	 * @return ad_city 市   
	 */
	public java.lang.String getAd_city() {
		return this.ad_city;
	}
	/**  
	 * 设置县/区  
	 * @param ad_region 县/区  
	 */  
	public void setAd_region(java.lang.String ad_region) {
		this.ad_region = ad_region;
	}
	
	/**  
	 * 获取县/区   
	 * @return ad_region 县/区   
	 */
	public java.lang.String getAd_region() {
		return this.ad_region;
	}
	/**  
	 * 设置详细地址  
	 * @param ad_detailaddress 详细地址  
	 */  
	public void setAd_detailaddress(java.lang.String ad_detailaddress) {
		this.ad_detailaddress = ad_detailaddress;
	}
	
	/**  
	 * 获取详细地址   
	 * @return ad_detailaddress 详细地址   
	 */
	public java.lang.String getAd_detailaddress() {
		return this.ad_detailaddress;
	}
	/**  
	 * 设置收货人姓名  
	 * @param ad_consignee 收货人姓名  
	 */  
	public void setAd_consignee(java.lang.String ad_consignee) {
		this.ad_consignee = ad_consignee;
	}
	
	/**  
	 * 获取收货人姓名   
	 * @return ad_consignee 收货人姓名   
	 */
	public java.lang.String getAd_consignee() {
		return this.ad_consignee;
	}
	/**  
	 * 设置收货人手机号码  
	 * @param ad_consigneephone 收货人手机号码  
	 */  
	public void setAd_consigneephone(java.lang.String ad_consigneephone) {
		this.ad_consigneephone = ad_consigneephone;
	}
	
	/**  
	 * 获取收货人手机号码   
	 * @return ad_consigneephone 收货人手机号码   
	 */
	public java.lang.String getAd_consigneephone() {
		return this.ad_consigneephone;
	}
	
	private EtcUser etcUser;
	
	public void setEtcUser(EtcUser etcUser){
		this.etcUser = etcUser;
	}
	
	public EtcUser getEtcUser() {
		return etcUser;
	}

	@Override
    public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("ad_id",getAd_id())
			.append("user_id",getUser_id())
			.append("ad_province",getAd_province())
			.append("ad_city",getAd_city())
			.append("ad_region",getAd_region())
			.append("ad_detailaddress",getAd_detailaddress())
			.append("ad_consignee",getAd_consignee())
			.append("ad_consigneephone",getAd_consigneephone())
			.toString();
	}
	
	@Override
    public int hashCode() {
		return new HashCodeBuilder()
			.append(getAd_id())
			.toHashCode();
	}
	
	@Override
    public boolean equals(Object obj) {
		if(obj instanceof EtcAddressbook == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		EtcAddressbook other = (EtcAddressbook)obj;
		return new EqualsBuilder()
			.append(getAd_id(),other.getAd_id())
			.isEquals();
	}
}

